package javacommon.util;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import org.apache.bcel.generic.NEW;
import org.apache.commons.lang.math.RandomUtils;

import com.sisterandbrother.model.ChatMsg;

public class ChatUtils {

	public static String getRandomColor() {
		StringBuffer colorBuffer = new StringBuffer(Integer.toString(RandomUtils.nextInt(16777216), 16));
		while (colorBuffer.length() < 6) {
			colorBuffer.insert(0, '0');
		}
		return colorBuffer.toString();
	}
	public static void main(String[] args) {
		System.out.println(111);
		JSONArray jsonArray = JSONArray.fromObject("[]");
		System.out.println(222);
		jsonArray.add(JSONObject.fromObject(new ChatMsg()));
		System.out.println(jsonArray);
		
	}
}
